#ifndef KEYCOUNTSERVER_H_
#define KEYCOUNTSERVER_H_

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <linux/unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <dirent.h>
#include <fcntl.h>
#include <time.h>
#include <stdarg.h>

#include <string>
#include <map>
#include <ahxgwnet.h>
using namespace ahxgwnet;

#define SA  sockaddr
#define SAI sockaddr_in
#define IA  in_addr

#define MAXLINE         1024
#define MAX_LEN         21
#define MAX_THREAD      10
#define SEVR_PORT       6112

#define REGISTER        0x0001
#define REGISTER_ACK    0x1001
#define LOGIN           0x0002
#define LOGIN_ACK       0x1002
#define UPLOAD          0x0003
#define UPLOAD_ACK      0x1003
#define DOWNLOAD        0x0004
#define DOWNLOAD_ACK    0x1004
#define LOGOUT          0x0005
#define LOGOUT_ACK      0x1005
#define UPLIMIT         LOGOUT

struct msgHead
{
    int cmd;
    int length;
    int error;
};

namespace KeyCountServer {

class Server;
class Client;
class ClientNet;
class ClientLocal;

}

#include "Server.h"
#include "Client.h"
#include "ClientNet.h"
#include "ClientLocal.h"

#endif
